package com.slz3.business.module.goodsManagement.gooGoods.domain;

import com.slz3.business.frame.annotation.ConfigDomain;
import com.slz3.business.module.goodsManagement.gooBrand.domain.GooBrand;
import com.slz3.business.module.goodsManagement.gooGoods.repository.GooGoodsRepository;
import com.slz3.business.module.goodsManagement.gooTypeLevel1.domain.GooTypeLevel1;
import com.slz3.business.module.goodsManagement.gooTypeLevel2.domain.GooTypeLevel2;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
@ConfigDomain(repositoryClass = GooGoodsRepository.class)
@Entity
@Table(schema = "goods_management", name = "goo_goods")
@Data
@EqualsAndHashCode(callSuper = true)
public class GooGoods extends GooGoodsEntity {

    /**
     * 自增 Long
     */
    @Column(insertable = false)
    @ColumnDefault("nextval('mishang_old_frame_id_seq')")
    private Long incrementId;

    /**
     * 商品图片1
     */
    @Transient
    private String serImg1;
    /**
     * 商品图片2
     */
    @Transient
    private String serImg2;
    /**
     * 商品图片3
     */
    @Transient
    private String serImg3;
    /**
     * 商品图片4
     */
    @Transient
    private String serImg4;
    /**
     * 商品图片5
     */
    @Transient
    private String serImg5;

    /**
     * banner图片集合
     */
    @Transient
    private String serBannerShuzu;

    /**
     * 购物车ID
     */
    @Transient
    private Long shopping_car_id;

    /**
     * 品牌类型
     */
    @Transient
    private GooBrand gooBrand;

    /**
     * 一级分类
     */
    @Transient
    private GooTypeLevel1 gooTypeLevel1;

    /**
     * 二级分类
     */
    @Transient
    private GooTypeLevel2 gooTypeLevel2;

    @Transient
    private Integer serGoodsRedisStock;

}
